package com.example.sal.service.impl;

import com.example.sal.pojo.Sales;
import org.springframework.stereotype.Service;

@Service
public class SalesServiceImpl {
    /**
     * 销售类员工的最终薪资
     */
    public Double calSalesSal(Sales sales){
        //1.获取基本工资
        //2.获取
        double a = sales.getSalvolume() * 0.01;
        sales.setCommission(a);
        sales.setTotalSal(sales.getBaseSal()+sales.getCommission());
        return sales.getBaseSal()+sales.getCommission();
    }
}
